</head>
<body>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
  <h2 class="u-tt">{$action_name}表单字段</h2>
  <ul id="tabs">
    <li> <a class="z-crt" href="#tab1"><span class="icon">&#xf05a;</span> 基本信息</a></li>
  </ul>
</div>
<div class="f-sep10"></div>
<div class="m-form">
  <form action="<?php echo url('admin_list/'.$action.'_save'); ?>" method="post" id="form">
    <fieldset>
      <div class="formitm">
        <label class="lab" >字段类型：</label>
        <div class="ipt">
          <div class="txt">
            <select name="type" id="type">
              <!--foreach:{$field_type $key $vo}-->
              <option value="{$key}" <?php if($info['type']==$key){ ?> selected="selected" <?php } ?> >{$vo.name}</option>
              <!--{/foreach}-->
            </select>
          </div>
          <span class="Validform_checktip">字段使用的种类</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >字段描述：</label>
        <div class="ipt">
          <input name="name" type="text" class="u-ipt" id="name" value="{$info.name}" datatype="s1-20" errormsg="字段描述至少1~20个字符！"  />
          <span class="Validform_checktip">功能简单描述</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >字段名：</label>
        <div class="ipt">
          <input name="field" type="text" class="u-ipt" id="field" value="{$info.field}" datatype="/^[A-Za-z_]+$/"   errormsg="字段名只能为英文和下划线" />
          <span class="Validform_checktip">数据表内的字段名</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >字段提示：</label>
        <div class="ipt">
          <input name="tip" type="text" class="u-ipt" value="{$info.tip}" />
          <span class="Validform_checktip">字段后面的提示信息</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >字段顺序：</label>
        <div class="ipt">
          <input name="sequence" type="text" class="u-ipt" id="sequence" value="{$info.sequence isset='0'}"  datatype="n" errormsg="字段顺序只能为数字" />
          <span class="Validform_checktip">数字越小越靠前</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >表单验证：</label>
        <div class="ipt">
            <input name="verification" type="text" class="u-ipt" id="verification" value="<?php echo unserialize($info['verification']); ?>" />
          <span class="Validform_checktip">不验证请留空，否则输入验证或正则</span> </div>
      </div>
      
      <div class="formitm">
        <label class="lab" >默认内容：</label>
        <div class="ipt">
          <textarea name="default" id="default" class="u-itt" >{$info.default html}</textarea>
          <span class="Validform_checktip">默认的内容，如果为单选多选等为数字，多选多个用|分隔开</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >字段配置：</label>
        <div class="ipt">
          <textarea name="config" id="config" class="u-itt" >{$info.config html}</textarea>
          <span class="Validform_checktip">针对单选、多选等类型的字段，输入格式：名称|值，一行一个</span> </div>
      </div>
	  
	  <div class="formitm">
        <label class="lab" >后台列表显示：</label>
        <div class="ipt">
          <div class="txt">
            <?php if(!isset($info['list_display'])){ $info['list_display']=1; } ?>
            <input name="list_display" type="radio" value="1" <?php if($info['list_display']==1){ ?> checked="checked" <?php } ?> />
            是
            &nbsp;&nbsp;
            <input name="list_display" type="radio" value="0" <?php if($info['list_display']==0){ ?> checked="checked" <?php } ?> />
            否 </div>
          <span class="Validform_checktip">选择后后台表单列表将显示本字段</span> </div>
      </div>
	  
      <div class="formitm formitm-1">
        <button class="u-btn" id="submit" type="submit">保存修改</button>
        <button class="u-btn u-btn-c4" id="reset" type="button">重置</button>
        <span id="tip" class="load"></span> </div>
    </fieldset>
    <input name="fid" type="hidden" value="{$form_info.id}">
	<input name="id" type="hidden" value="{$info.id}">
  </form>
</div>
</body>
<script>
Do.ready('base','form', function() {
	saveform('<?php echo url("admin_list/index",array("fid"=>$form_info["fid"])); ?>');
});
</script>